package com.hsxc.cdz.monitor.bean.pile.v1_33;

import com.hsxc.cdz.base.util.BytesUtil;

/**
 * @author 作者 : 陈钊
 * @version 创建时间：2016年9月21日 上午11:18:39 
 * 类说明： 直流桩主动上传充电进行中信息，该报文不需要回复
 */
public class UploadChargeDataPileMsg extends PileMessage {

	private String readTime;// 读表时间
	private int chargePort;// 充电口号
	private int startRecord; // 充电前电表读数
	private int currentRecord; // 当前电表读数
	private int electricity; // 本次充电金额
	private int chargeVoltage;// 充电电压
	private int chargeElectricity;// 充电电流
	private int chargeTime;// 充电时间
	private int outputPower;// 输出功率
	private int portState;// 充电接口状态
	private int SOC;// 当前荷电状态
	private int leftElectricity;// 估算剩余充电
	private int maxVoltageAndTeamNo;// 最高单体动力蓄电池及其组号

	public String getReadTime() {
		return readTime;
	}

	public void setReadTime(String readTime) {
		this.readTime = readTime;
	}

	public int getChargePort() {
		return chargePort;
	}

	public void setChargePort(int chargePort) {
		this.chargePort = chargePort;
	}

	public int getStartRecord() {
		return startRecord;
	}

	public void setStartRecord(int startRecord) {
		this.startRecord = startRecord;
	}

	public int getCurrentRecord() {
		return currentRecord;
	}

	public void setCurrentRecord(int currentRecord) {
		this.currentRecord = currentRecord;
	}

	public int getElectricity() {
		return electricity;
	}

	public void setElectricity(int electricity) {
		this.electricity = electricity;
	}

	public int getChargeVoltage() {
		return chargeVoltage;
	}

	public void setChargeVoltage(int chargeVoltage) {
		this.chargeVoltage = chargeVoltage;
	}

	public int getChargeElectricity() {
		return chargeElectricity;
	}

	public void setChargeElectricity(int chargeElectricity) {
		this.chargeElectricity = chargeElectricity;
	}

	public int getChargeTime() {
		return chargeTime;
	}

	public void setChargeTime(int chargeTime) {
		this.chargeTime = chargeTime;
	}

	public int getOutputPower() {
		return outputPower;
	}

	public void setOutputPower(int outputPower) {
		this.outputPower = outputPower;
	}

	public int getPortState() {
		return portState;
	}

	public void setPortState(int portState) {
		this.portState = portState;
	}

	public int getSOC() {
		return SOC;
	}

	public void setSOC(int sOC) {
		SOC = sOC;
	}

	public int getLeftElectricity() {
		return leftElectricity;
	}

	public void setLeftElectricity(int leftElectricity) {
		this.leftElectricity = leftElectricity;
	}

	public int getMaxVoltageAndTeamNo() {
		return maxVoltageAndTeamNo;
	}

	public void setMaxVoltageAndTeamNo(int maxVoltageAndTeamNo) {
		this.maxVoltageAndTeamNo = maxVoltageAndTeamNo;
	}

	@Override
	public void getContentFromByte(byte[] data) {
		byte[] temp;

		temp = BytesUtil.getByte(0, 7, data);
		this.setReadTime(readTime);

		temp = BytesUtil.getByte(7, 1, data);
		this.setChargePort(BytesUtil.bytesToIntSeq(temp));

		temp = BytesUtil.getByte(8, 4, data);
		this.setStartRecord(startRecord);

		temp = BytesUtil.getByte(12, 4, data);
		this.setCurrentRecord(currentRecord);

		temp = BytesUtil.getByte(16, 4, data);
		this.setElectricity(chargeElectricity);

		temp = BytesUtil.getByte(20, 3, data);
		this.setChargeVoltage(chargeVoltage);

		temp = BytesUtil.getByte(23, 3, data);
		this.setChargeElectricity(chargeElectricity);

		temp = BytesUtil.getByte(26, 3, data);
		this.setChargeTime(chargeTime);

		temp = BytesUtil.getByte(29, 3, data);
		this.setOutputPower(outputPower);

		temp = BytesUtil.getByte(32, 1, data);
		this.setPortState(portState);

		temp = BytesUtil.getByte(33, 1, data);
		this.setSOC(SOC);

		temp = BytesUtil.getByte(34, 2, data);
		this.setLeftElectricity(leftElectricity);

		temp = BytesUtil.getByte(36, 2, data);
		this.setMaxVoltageAndTeamNo(maxVoltageAndTeamNo);

	}

}
